export default{
	data(){
		return{
			
		}
	},
	onload(){
		
	},
	// 分享给朋友
	onShareAppMessage(obj) {
		var pages = getCurrentPages();
		var page = pages[pages.length - 1];
		var pathUrl = page.route;
		let title = getApp().globalData.appName
		if(pathUrl == 'pages/my/my'){
			let uid = uni.getStorageSync('uid')
			return {
			  title: title,
			  path: 'pages/work/user?id='+uid,
			  imageUrl:'/static/logos.png'
			}
		}else if(pathUrl == 'pages/work/workDetails'){
			if(page.__data__.workObj.auditing_status == 1){
				return {
				  title: page.__data__.workObj.title,
				  path: page.$page.fullPath,
				  imageUrl:page.__data__.workObj.image
				}
			}else{
				uni.showToast({
					title:'该作品暂不能分享',
					none:'none'
				})
				return null
			}
		}else if(pathUrl == 'pages/singleChat/singleChat'){
			let objData = uni.getStorageSync('nowAssistant')
			return {
			  title: '《'+page.options.name+'》'+page.options.welcome_message,
			  path: page.$page.fullPath,
			  imageUrl:objData.icon
			}
		}else{
			return {
			  title: title,
			  path: 'pages/index/index',
			  imageUrl:'/static/logos.png'
			}
		}
		
		
	},
	
	methods:{
		
	}
}